Skip to content

Commit f3848ee

Browse files
committed
working on main page
1 parent 6005059 commit f3848ee

File tree

75 files changed

+287
-18
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+287
-18
lines changed

components/layout.tsx

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@ export default function Layout({ children, bg, getHeightViewport }: any) {
1111

1212
const NavBar = useRef<HTMLDivElement>(null);
1313
useResizeObserver(NavBar, (entry) => getHeightViewport(`(100vh - ${entry.contentRect.height}px)`));
14-
const countUpRef = useRef(null);
15-
let stupidEnd = Math.floor(Math.random() * 1000)
16-
let [stupidCounter, setStupidCounter] = useState<number>(0);
17-
const [renderClientSideComponent, setRenderClientSideComponent] = useState(false);
1814

1915
// useEffect(() => {
2016
// setInterval(() => {
@@ -30,13 +26,11 @@ export default function Layout({ children, bg, getHeightViewport }: any) {
3026
</Head>
3127
<AppBar position="fixed" id="NavBar" sx={{ zIndex: (theme) => theme.zIndex.drawer + 1 }} ref={NavBar}>
3228
<Toolbar>
33-
<Typography variant="h4" noWrap sx={{ flexGrow: 1 }}>
34-
Trapped Chest
35-
</Typography>
36-
37-
{/* <Typography variant="h3" sx={{ mx: 'auto' }}>
38-
{stupidEnd}
39-
</Typography> */}
29+
<Link href='/' passHref>
30+
<Typography variant="h4" noWrap sx={{ flexGrow: 1, cursor: 'pointer' }} >
31+
Trapped Chest
32+
</Typography>
33+
</Link>
4034
<Box sx={{ flexGrow: 1 }} />
4135
<Stack direction="row" spacing={3}>
4236
<Link href="https://discord.gg/E8qq6tN">

components/trapped/inventory.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function GuiInventory({ gui, index, isEditError, onEdit, onClick,
4242
}}>
4343
{gui.data[i * 9 + j] &&
4444
<Box sx={{ position: 'relative', width: '100%', height: '100%' }}>
45-
<Image src={`/images/items/minecraft__${gui.data[i * 9 + j].id}.png`} layout='fill' alt={gui.data[i * 9 + j].id} />
45+
<Image src={`/images/items/minecraft__${gui.data[i * 9 + j].id}.png`} layout='fill' alt={gui.data[i * 9 + j].id} style={{imageRendering: 'pixelated'}}/>
4646
<Typography sx={{ position: 'absolute', bottom: 0, right: 0 }}>{gui.data[i * 9 + j].count}</Typography>
4747
</Box>
4848
}

lib/constants.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11

22
export const itemListURL = "https://raw.githubusercontent.com/PixiGeko/Minecraft-generated-data/latest-release/custom-generated/registries/item.txt";
3+
export const blockListURL = "https://raw.githubusercontent.com/PixiGeko/Minecraft-generated-data/latest-release/custom-generated/registries/block.txt";
34

45
export function reorder<T>(list: Array<T>, startIndex: number, endIndex: number): Array<T> {
56
const result = Array.from(list);

package-lock.json

Lines changed: 181 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333
"react-dnd-html5-backend": "^16.0.1",
3434
"react-dom": "17.0.2",
3535
"react-material-ui-carousel": "^3.4.2",
36+
"react-swipeable-views": "^0.14.0",
37+
"react-swipeable-views-utils": "^0.14.0",
3638
"react-transition-group": "^4.4.2",
3739
"rete-react-render-plugin": "^0.3.0"
3840
},
@@ -41,6 +43,8 @@
4143
"@types/node": "^16.11.6",
4244
"@types/react": "17.0.33",
4345
"@types/react-beautiful-dnd": "^13.1.2",
46+
"@types/react-swipeable-views": "^0.13.1",
47+
"@types/react-swipeable-views-utils": "^0.13.4",
4448
"autoprefixer": "^10.4.12",
4549
"eslint": "7.32.0",
4650
"eslint-config-next": "12.0.1",

0 commit comments

Comments
 (0)