Skip to content

Instantly share code, notes, and snippets.

....
<h1 className="font-raleway font-semibold">The new Begining</h1>
...
return (
<div>
<h1 className="font-raleway">The new Begining</h1>
<h1 className="font-roboto">The new Begining</h1>
<h1>The new Begining</h1>
</div>
);
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}",
],
theme: {
extend: {
import type { Metadata } from "next";
import { Raleway, Roboto } from "next/font/google";
import "./globals.css";
const raleway = Raleway({
subsets: ["latin"],
weight: ["100", "400", "600"],
variable: "--font-raleway",
});
@tailwind base;
@tailwind components;
@tailwind utilities;
.raleway {
font-family: var(--font-raleway);
}
.raleway-semibold {
font-family: var(--font-raleway);
...
return (
<div>
<h1 className="raleway">The new Begining</h1>
<h1 className="raleway-semibold">The new Begining</h1>
<h1>The new Begining</h1>
</div>
);
import type { Metadata } from "next";
import { Raleway } from "next/font/google";
import "./globals.css";
const raleway = Raleway({
subsets: ["latin"],
weight: ["100", "400", "600"],
variable: "--font-raleway",
});
.raleway {
font-family: var(--font-raleway);
}
.raleway-semibold {
font-family: var(--font-raleway);
font-weight: 600;
}
"use client";
import { useEffect, useState } from "react";
import { User } from "./api/users/data";
export default function Home() {
const [users, setUsers] = useState<User[]>([]);
const getUsers = async () =>
fetch("/api/users")
.then(function (response) {
import { NextRequest, NextResponse } from "next/server";
import { users } from './data'
export async function GET(_request: NextRequest) {
// here you can make the external api call to fetch any data.
// Right now we are only getting data from the data.ts file.
return NextResponse.json({
message: "User List",
data: users