Fixed tailwindcss and layout.

This commit is contained in:
SamTV12345 2024-02-24 15:10:18 +01:00
parent 9767a78b78
commit 1f980bb813
4 changed files with 60 additions and 8 deletions

View file

@ -83,6 +83,8 @@
"etherpad-lite": "node/server.ts"
},
"devDependencies": {
"autoprefixer": "^10.4.17",
"postcss": "^8.4.35",
"@types/async": "^3.2.24",
"@types/express": "^4.17.21",
"@types/http-errors": "^2.0.4",

View file

@ -1,9 +1,31 @@
import 'tailwindcss/tailwind.css'
import {connect} from 'socket.io-client'
import {useEffect} from "react";
export const Admin = ()=>{
useEffect(() => {
const socket = connect('/settings')
socket.on('connect', () => {
socket.emit('load');
});
socket.on('disconnect', (reason) => {
// The socket.io client will automatically try to reconnect for all reasons other than "io
// server disconnect".
if (reason === 'io server disconnect') socket.connect();
});
socket.on('settings', (settings) => {
console.log(settings)
})
}, []);
return(
<div>
<h1 className="text-red-50">Admin12345</h1>
</div>
<h1 className="">Admin1234</h1>
)
}

View file

@ -0,0 +1,28 @@
import {FC} from "react";
import packageJson from '../../../package.json';
type Repo = {
name: string
}
import { Metadata } from 'next'
export const metadata: Metadata = {
title: 'Home',
description: 'Welcome to Next.js',
}
type RootLayoutProps = {
children: React.ReactNode|React.ReactNode[]
}
const RootLayout:FC<RootLayoutProps> = ({children})=>{
return <div>
{children}
{packageJson.name}
</div>
}
export default RootLayout

View file

@ -2,9 +2,9 @@ import type { Config } from "tailwindcss";
const config: Config = {
content: [
"./src/pages/**/*.{js,ts,jsx,tsx,mdx}",
"./src/components/**/*.{js,ts,jsx,tsx,mdx}",
"./src/app/**/*.{js,ts,jsx,tsx,mdx}",
"./pages/**/*.{js,ts,jsx,tsx,mdx}",
"./components/**/*.{js,ts,jsx,tsx,mdx}",
"./app/**/*.{js,ts,jsx,tsx,mdx}",
],
theme: {
extend: {