#!/usr/bin/env node
import React from "react";
import { render, Box, Text } from "ink";
console.log("This app is still WIP!\n\n");
// testing dummies
import hexrcs from "./profiles/hexrcs.json";
import template from "./profiles/template.json";
function main() {
const args = process.argv.slice(2);
let root;
if (args.find(x => x === "-h" || x === "--help")) {
if (args.length === 1) {
root = ;
} else {
root = ;
}
} else if (args.length === 0) {
root = ;
} else {
root = ;
}
render(root);
}
type AppProps = {
profile: {
name: string;
about: string;
links?: {
label: string;
url: string;
}[];
};
};
const Help = () => Help page;
const Invalid = () => Invalid arguments!;
const App = ({ profile }: AppProps) => {
// TODO: the list should be generated
// also should we use real names (can be long and space separated) or use handles?
// shouldn't be a problem when later we have a server and whatnot
return (
{profile.name}
{profile.about}
{profile.links?.map((x, i) => (
- {x.label}
))}
);
};
main();