Skip to content

Commit

Permalink
fix: single type imports
Browse files Browse the repository at this point in the history
  • Loading branch information
alicanerdurmaz committed May 31, 2024
1 parent d8d5ec7 commit cdcbc97
Show file tree
Hide file tree
Showing 15 changed files with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
ShowButton,
useTable,
} from "@refinedev/antd";
import { type BaseRecord } from "@refinedev/core";
import type { BaseRecord } from "@refinedev/core";
import { Space, Table } from "antd";
import React from "react";
<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Metadata } from "next";
import type { Metadata } from "next";
<%- (_app.nextjsImport || []).join("\n") _%>
import React, { Suspense } from "react";
import { RefineContext } from "./_refine_context";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import { cookies } from "next/headers";

export const authProviderServer: Pick<AuthProvider, "check"> = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import Cookies from "js-cookie";

const mockUsers = [
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Metadata } from "next";
import type { Metadata } from "next";
<%- (_app.nextjsImport || []).join("\n") _%>
import React, { Suspense } from "react";
import { RefineContext } from "./_refine_context";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type Metadata } from "next";
import type { Metadata } from "next";
<%- (_app.nextjsImport || []).join("\n") _%>
import React, { Suspense } from "react";
import { RefineContext } from "./_refine_context";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use client";

import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import { AuthHelper } from "@refinedev/strapi-v4";
import { axiosInstance } from "@utility/axios-instance";
import { API_URL, TOKEN_KEY } from "@utility/constants";
Expand Down
2 changes: 1 addition & 1 deletion refine-remix/plugins/_base/app/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type PropsWithChildren } from "react";
import type { PropsWithChildren } from "react";
import { Breadcrumb } from "../breadcrumb";
import { Menu } from "../menu";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ShowButton,
useTable,
} from "@refinedev/antd";
import { type BaseRecord } from "@refinedev/core";
import type { BaseRecord } from "@refinedev/core";
import { Space, Table } from "antd";
import React from "react";
<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppwriteException } from "@refinedev/appwrite";
import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import * as cookie from "cookie";
import Cookies from "js-cookie";
import { v4 as uuidv4 } from "uuid";
Expand Down
2 changes: 1 addition & 1 deletion refine-vite/plugins/_base/src/components/layout/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type PropsWithChildren } from "react";
import type { PropsWithChildren } from "react";
import { Breadcrumb } from "../breadcrumb";
import { Menu } from "../menu";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
ShowButton,
useTable,
} from "@refinedev/antd";
import { type BaseRecord } from "@refinedev/core";
import type { BaseRecord } from "@refinedev/core";
import { Space, Table } from "antd";
import React from "react";
<%_ if (answers["data-provider"] === "data-provider-hasura") { _%>
Expand Down
8 changes: 4 additions & 4 deletions refine-vite/plugins/auth-provider-custom/src/authProvider.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";

export const TOKEN_KEY = "refine-auth";

Expand All @@ -24,20 +24,20 @@ export const authProvider: AuthProvider = {
localStorage.removeItem(TOKEN_KEY);
return {
success: true,
redirectTo: "/login"
redirectTo: "/login",
};
},
check: async () => {
const token = localStorage.getItem(TOKEN_KEY);
if (token) {
return {
authenticated: true
authenticated: true,
};
}

return {
authenticated: false,
redirectTo: "/login"
redirectTo: "/login",
};
},
getPermissions: async () => null,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { AppwriteException } from "@refinedev/appwrite";
import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import { v4 as uuidv4 } from "uuid";
import { account } from "./utility";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type AuthProvider } from "@refinedev/core";
import type { AuthProvider } from "@refinedev/core";
import { AuthHelper } from "@refinedev/strapi-v4";
import axios from "axios";
import { API_URL, TOKEN_KEY } from "./constants";
Expand Down

0 comments on commit cdcbc97

Please sign in to comment.