Skip to content

Commit

Permalink
just call me
Browse files Browse the repository at this point in the history
  • Loading branch information
pratyush1712 committed May 19, 2024
1 parent 07746ea commit c62c4ff
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 28 deletions.
2 changes: 1 addition & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"plugins": ["@typescript-eslint"],
"extends": ["next/core-web-vitals", "plugin:@typescript-eslint/recommended"],
"rules": {
"@typescript-eslint/no-unused-vars": "error",
"@typescript-eslint/no-unused-vars": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
4 changes: 4 additions & 0 deletions public/readmes/overview.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# 📖 Overview <a href="https://www.youtube.com/watch?v=B46EdJApFmI"><img class="overview" src="/icons/teal_ribbon.ico" style="width:15px;" /></a> <a href="https://youtu.be/DlFkfOqtgR8?si=T-OzRtnyO_S0aW0X"><img class="overview" src="/icons/orange_ribbon.ico" style="width:15px;" /></a>

<div align="left" style="font-size: 16px;background-color: rgba(0, 0, 0, 0.7); padding: 10px; border-radius: 2px;">
I strive to be known as the most approachable person. Always here for friends, nk. call me &#128524;
</div>

## 🚀 Summary

Hey there! I’m a junior studying computer science and math. Over the past two years, I've immersed myself in numerous projects, improving my technical and managerial skills, and having a great time exploring new frameworks and software techniques.
Expand Down
8 changes: 4 additions & 4 deletions src/app/(home)/page.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Box, Divider, Grid, IconButton, Link, Stack, Tooltip, Typography } from "@mui/material";
import { links } from "@/utils/links";
// import PlayList from "@/components/HomeLayout/PlayList";
import PlayList from "@/components/HomeLayout/PlayList";

export default function Home() {
const iconLink = (link: any) => {
Expand Down Expand Up @@ -34,7 +34,7 @@ export default function Home() {
padding: "5px",
fontSize: { xs: "0.4rem", sm: "0.8rem" }
}}>
I strive to be known as the most approachable person. Always here for friends, nk &#128524;
I strive to be known as the most approachable person. Always here for friends, nk. call me &#128524;
</Typography>
</Grid>
{/* Links at the bottom */}
Expand All @@ -49,9 +49,9 @@ export default function Home() {
</Grid>

{/* Playlist occupying most of the screen */}
{/* <Grid item xs={12} sx={{ flexGrow: 1, minWidth: "100%", justifyContent: "center" }}>
<Grid item xs={12} sx={{ flexGrow: 1, minWidth: "100%", justifyContent: "center" }}>
<PlayList />
</Grid> */}
</Grid>
</Grid>
);
}
21 changes: 8 additions & 13 deletions src/components/HomeLayout/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ import { useParams, usePathname, useRouter } from "next/navigation";
import createCache from "@emotion/cache";
import { useServerInsertedHTML } from "next/navigation";
import { CacheProvider } from "@emotion/react";
import PlayList from "./PlayList";

interface Page {
index: number;
Expand All @@ -37,6 +36,7 @@ interface VSCodeLayoutProps {
export default function VSCodeLayout({ options, children }: VSCodeLayoutProps) {
const router = useRouter();
const params = useParams();
const pathname = usePathname();
const [expanded, setExpanded] = useState(isBrowser);
const [selectedIndex, setSelectedIndex] = useState(routeToPage[params.slug as string]?.index ?? null);
const [currentComponent, setCurrentComponent] = useState("");
Expand Down Expand Up @@ -100,6 +100,12 @@ export default function VSCodeLayout({ options, children }: VSCodeLayoutProps) {
return { cache, flush };
});

useEffect(() => {
if (!isBrowser && pathname === "/") {
router.push("/overview");
}
}, [router, pathname]);

useServerInsertedHTML(() => {
const names = flush();
if (names.length === 0) {
Expand Down Expand Up @@ -171,7 +177,7 @@ export default function VSCodeLayout({ options, children }: VSCodeLayoutProps) {
<Grid
sx={{
scrollBehavior: "smooth",
overflowY: "hidden",
overflowY: "auto",
maxHeight: "calc(100vh - 53px)",
background: !darkMode ? "#FFFFFF" : "#1e1e1e"
}}>
Expand All @@ -184,17 +190,6 @@ export default function VSCodeLayout({ options, children }: VSCodeLayoutProps) {
}}>
{children}
</Container>
{usePathname() === "/" && (
<Grid
item
sx={{
mt: { xs: -98, sm: -62 },
minWidth: "100%",
justifyContent: "center"
}}>
<PlayList isBrowser={isBrowser} />
</Grid>
)}
</Grid>
</Grid>
</Grid>
Expand Down
14 changes: 4 additions & 10 deletions src/components/HomeLayout/PlayList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,13 +125,12 @@ function PlayListListView() {
);
}

export default function PlayList({ isBrowser = true }: { isBrowser: boolean }) {
export default function PlayList() {
const hoverRef = useRef<number>(-1);
const [hoverIndex, setHoverIndex] = useState<number>(-1);
const [hoverTimeoutId, setHoverTimeoutId] = useState<NodeJS.Timeout | undefined>();
// const switchRef = useRef<number>(0);
// eslint-disable-next-line @typescript-eslint/no-unused-vars
const [isMobile, setIsMobile] = useState<boolean>(isBrowser);
const randomSongsOffset = useRef<number>(0);
const randomSongs = useMemo(() => shuffle(songs), []);
const [displayedSongs, setDisplayedSongs] = useState<any[]>(randomSongs.slice(0, ITEMS_PER_LOAD));
Expand Down Expand Up @@ -306,18 +305,13 @@ export default function PlayList({ isBrowser = true }: { isBrowser: boolean }) {
}),
[displayedSongs, hoverIndex, handleBubbleClick, hoverTimeoutId]
);
console.log("isMobile", isMobile);

return (
<Container sx={{ position: "relative", maxHeight: "70%" }}>
<PlaylistLabel />
{isMobile ? (
<BubbleUI options={options} className="myBubbleUI" loadMore={loadMore}>
{songBubbles}
</BubbleUI>
) : (
<PlayListListView />
)}
<BubbleUI options={options} className="myBubbleUI" loadMore={loadMore}>
{songBubbles}
</BubbleUI>
</Container>
);
}

1 comment on commit c62c4ff

@vercel
Copy link

@vercel vercel bot commented on c62c4ff May 19, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.