@@ -1,12 +0,0 @@
|
||||
import React from "react";
|
||||
|
||||
const Footer = (): JSX.Element => {
|
||||
return (
|
||||
<footer>
|
||||
<hr />
|
||||
<span>{"I'm here to stay (Footer)"}</span>
|
||||
</footer>
|
||||
);
|
||||
};
|
||||
|
||||
export default Footer;
|
||||
@@ -1,23 +0,0 @@
|
||||
import { startOfMonth, endOfMonth } from "date-fns";
|
||||
|
||||
interface ValidDateRange {
|
||||
start: Date;
|
||||
end: Date;
|
||||
}
|
||||
|
||||
/**
|
||||
* A function that will determine the valid date range for the navigation of the charts.
|
||||
* @returns An object with a start and end key with the given date for the start and end of the range.
|
||||
*/
|
||||
const findValidDateRange = (): ValidDateRange => {
|
||||
const currDate = new Date(); // Current date.
|
||||
const startDate = startOfMonth(currDate); // Will eventually be the creation date of the account or the creation date the selected chart. Whichever is older.
|
||||
const endDate = endOfMonth(currDate); // Always needs to be the last day on the current month within the current year.
|
||||
|
||||
return {
|
||||
start: startDate,
|
||||
end: endDate
|
||||
};
|
||||
};
|
||||
|
||||
export default findValidDateRange;
|
||||
24
src/components/buttons/GitHub.tsx
Normal file
24
src/components/buttons/GitHub.tsx
Normal file
@@ -0,0 +1,24 @@
|
||||
import React from "react";
|
||||
import { Box, Link, Button, BoxProps, Text } from "@chakra-ui/react";
|
||||
import { Icon } from "@iconify/react";
|
||||
import { motion } from "framer-motion";
|
||||
|
||||
const MotionBox = motion<BoxProps>(Box);
|
||||
|
||||
const GitHub = (): JSX.Element => {
|
||||
return (
|
||||
<MotionBox whileHover={{ scale: 1.1 }} whileTap={{ scale: 0.9 }}>
|
||||
<Link
|
||||
href="work/lcm/LucidCreationsWebsite/src/components/buttons/KoFi.tsx"
|
||||
target="_blank"
|
||||
rel="noopener"
|
||||
>
|
||||
<Button variant="primary" leftIcon={<Icon icon="mdi:github" />}>
|
||||
<Text>{"View Codebase"}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
</MotionBox>
|
||||
);
|
||||
};
|
||||
|
||||
export default GitHub;
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface LinkObj {
|
||||
href?: string;
|
||||
name?: string;
|
||||
type: "primary" | "secondary" | "updates" | "ko-fi";
|
||||
type: "primary" | "secondary" | "ko-fi" | "GitHub";
|
||||
}
|
||||
|
||||
type Links = LinkObj[];
|
||||
@@ -19,6 +19,9 @@ const links: Links = [
|
||||
href: "https://t.me/LucidCreationsMedia",
|
||||
name: "Dev Updates",
|
||||
type: "secondary"
|
||||
},
|
||||
{
|
||||
type: "GitHub"
|
||||
}
|
||||
];
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ import { Box, HStack, VStack } from "@chakra-ui/react";
|
||||
import CustomButton from "./Custom";
|
||||
import links, { LinkObj } from "./data/links";
|
||||
import KoFi from "./KoFi";
|
||||
import GitHub from "./GitHub";
|
||||
|
||||
const Buttons = (): JSX.Element => {
|
||||
return (
|
||||
@@ -32,6 +33,10 @@ const Buttons = (): JSX.Element => {
|
||||
if (type === "ko-fi") {
|
||||
return <KoFi key={type} />;
|
||||
}
|
||||
|
||||
if (type === "GitHub") {
|
||||
return <GitHub key={type} />;
|
||||
}
|
||||
})}
|
||||
</HStack>
|
||||
<VStack
|
||||
@@ -59,6 +64,10 @@ const Buttons = (): JSX.Element => {
|
||||
if (type === "ko-fi") {
|
||||
return <KoFi key={type} />;
|
||||
}
|
||||
|
||||
if (type === "GitHub") {
|
||||
return <GitHub key={type} />;
|
||||
}
|
||||
})}
|
||||
</VStack>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user