Skip to content

Instantly share code, notes, and snippets.

@createdbymahmood
Created December 18, 2020 16:37
Show Gist options
  • Save createdbymahmood/e7f8b8fb043501c111d17c187c8bcba6 to your computer and use it in GitHub Desktop.
Save createdbymahmood/e7f8b8fb043501c111d17c187c8bcba6 to your computer and use it in GitHub Desktop.
import { PartialDeep } from "type-fest";
export type RouteConfigProps = PartialDeep<{
layout: {
include: boolean;
topbar: boolean;
};
accessKey: string;
}>;
export const routeConfigs: Record<
"home" | "users" | "user",
RouteConfigProps
> = {
home: {
layout: {
include: false,
topbar: false,
},
accessKey: "home",
},
users: {
layout: {
include: true,
topbar: true,
},
accessKey: "users",
},
user: {
layout: {
topbar: true,
},
accessKey: "user",
},
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment