Skip to content

Commit

Permalink
Fix icons rendering and event timestamps
Browse files Browse the repository at this point in the history
  • Loading branch information
sidlak-c137 committed Oct 3, 2023
1 parent 6df7f78 commit 472cf46
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion components/EventCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ interface IEventCard {

export default function EventCard(props: IEventCard) {
const { name, date, location, image, loading } = props;

console.log(date);
return (
<Card
variant='elevated'
Expand Down
6 changes: 5 additions & 1 deletion components/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import {
faFacebookSquare,
faLinkedin,
} from "@fortawesome/free-brands-svg-icons";
import '@fortawesome/fontawesome-svg-core/styles.css';
// Prevent fontawesome from adding its CSS since we did it manually above:
import { config } from '@fortawesome/fontawesome-svg-core';
config.autoAddCss = false;

interface IIcon {
key: string;
Expand Down Expand Up @@ -62,7 +66,7 @@ export default function Footer() {
<Link key={icon.key} href={icon.link}>
<FontAwesomeIcon
size="2x"
color='white'
color="white"
icon={icon.icon}
/>
</Link>
Expand Down
4 changes: 2 additions & 2 deletions components/GithubButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UserCredential } from "firebase/auth";
// @ts-ignore
// import { useAuth } from "@/context/AuthContext"
import { Button, Center, Text } from "@chakra-ui/react";
import { VscGithub } from "react-icons/vsc";
// import { VscGithub } from "react-icons/vsc";

interface GithubLoginProps {
onLoginSuccess: (result: UserCredential) => void;
Expand All @@ -31,7 +31,7 @@ function GithubLoginComponent({ onLoginSuccess }: GithubLoginProps) {
w={"full"}
maxW={"md"}
variant={"outline"}
leftIcon={<VscGithub />}
// leftIcon={<VscGithub />}
>
<Center>
<Text>Test login</Text>
Expand Down
4 changes: 2 additions & 2 deletions components/SignInButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { UserCredential } from "firebase/auth";
// @ts-ignore
// import { useAuth } from "@/context/AuthContext"
import { Button, Center, Text } from "@chakra-ui/react";
import { VscGithub } from "react-icons/vsc";
// import { VscGithub } from "react-icons/vsc";

interface SignInProps {
onSignInSuccess: (result: UserCredential) => void;
Expand Down Expand Up @@ -34,7 +34,7 @@ function SignInComponent({ onSignInSuccess }: SignInProps) {
w={"full"}
maxW={"md"}
variant={"outline"}
leftIcon={<VscGithub />}
// leftIcon={<VscGithub />}
>
<Center>
<Text>Test login</Text>
Expand Down
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "hcp-website",
"version": "0.1.0",
"version": "2.0.2",
"private": true,
"scripts": {
"dev": "next dev",
Expand Down Expand Up @@ -37,7 +37,6 @@
"react-dom": "18.2.0",
"react-file-base64": "^1.0.3",
"react-firebase-hooks": "^5.1.1",
"react-icons": "^4.10.1",
"sharp": "^0.32.0",
"typescript": "4.9.5"
},
Expand Down
2 changes: 0 additions & 2 deletions pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ import { IEventInfo } from "@/utils/parsers";
// @ts-ignore
import Room from "@/components/Room";

// @ts-ignore
// const Room = lazy(() => import("@/components/Room"));
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down
3 changes: 3 additions & 0 deletions pages/join.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ import { UserCredential, signOut } from "firebase/auth";
import { exchangeAuth } from "@/utils/api.js";
// @ts-ignore
import { SpecialIconButton, SpecialSubmitButton } from "@/components/Parts";
// Prevent fontawesome from adding its CSS since we did it manually above:
import { config } from '@fortawesome/fontawesome-svg-core';
config.autoAddCss = false;
const inter = Inter({ subsets: ["latin"] });

function Title() {
Expand Down
6 changes: 3 additions & 3 deletions utils/parsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export interface IEventInfo {
export const parseEvents = (data: any[]) => {
const ret = data.map((obj) => {
const res: IEventInfo = {
date: new Date(obj.Date),
date: new Date(obj.Date * 1000),
name: obj.Name,
location: obj.Location,
description: obj.Description,
Expand Down Expand Up @@ -86,8 +86,8 @@ export const parsePeople = (data: any[]) => {
const res: IPeopleInfo = {
active: obj.active,
year: obj.Class_Standing,
dateJoined: new Date(obj.Date_Joined),
dateLeft: new Date(obj.Date_Left),
dateJoined: new Date(obj.Date_Joined * 1000),
dateLeft: new Date(obj.Date_Left * 1000),
email: obj.Email,
image: isValidHttpUrl(obj.Image) ? obj.Image : null,
name: obj.Name,
Expand Down
5 changes: 0 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2879,11 +2879,6 @@ react-focus-lock@^2.9.4:
use-callback-ref "^1.3.0"
use-sidecar "^1.1.2"

react-icons@^4.10.1:
version "4.11.0"
resolved "https://registry.npmjs.org/react-icons/-/react-icons-4.11.0.tgz"
integrity sha512-V+4khzYcE5EBk/BvcuYRq6V/osf11ODUM2J8hg2FDSswRrGvqiYUYPRy4OdrWaQOBj4NcpJfmHZLNaD+VH0TyA==

react-is@^16.13.1, react-is@^16.7.0:
version "16.13.1"
resolved "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz"
Expand Down

0 comments on commit 472cf46

Please sign in to comment.