Skip to content

Commit

Permalink
Revert "add ethereum identity kit to app"
Browse files Browse the repository at this point in the history
This reverts commit 59a45f7.
  • Loading branch information
encryptedDegen committed Dec 21, 2024
1 parent 9598a04 commit 66f03f1
Show file tree
Hide file tree
Showing 30 changed files with 1,149 additions and 907 deletions.
2 changes: 1 addition & 1 deletion .million/store.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"encodings":[],"reactData":{},"unusedFiles":[],"mtime":null}
{ "encodings": [], "reactData": {}, "unusedFiles": [], "mtime": null }
Binary file modified bun.lockb
Binary file not shown.
324 changes: 164 additions & 160 deletions next.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -18,182 +18,186 @@ import { withSentryConfig } from "@sentry/nextjs";

// curl https://api.github.com/repos/ethereumfollowprotocol/app/commits/develop | jq --raw-output '.sha'
const APP_VERSION =
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA ||
childProcess.execSync('git rev-parse --short HEAD || echo "no-git"').toString().trim();
process.env.NEXT_PUBLIC_VERCEL_GIT_COMMIT_SHA ||
childProcess
.execSync('git rev-parse --short HEAD || echo "no-git"')
.toString()
.trim();

console.info(`\nBuilding with app version: ${APP_VERSION}\n`);

/** @type {NextConfig} */
const nextConfig = {
cleanDistDir: true,
trailingSlash: false,
reactStrictMode: true,
poweredByHeader: false,
experimental: {
useLightningcss: true,
},
generateBuildId: async () => APP_VERSION,
env: {
NEXT_TELEMETRY_DISABLED: "1",
APP_VERSION,
APP_VERSION_SHORT: APP_VERSION?.slice(0, 7),
},
logging: {
fetches: { fullUrl: true },
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "ipfs.io",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "imgur.com",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "i.imgur.com",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "euc.li",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "gateway.pinata.cloud",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "rainbow.mypinata.cloud",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "api.ethfollow.xyz",
port: "",
pathname: "/*",
},
cleanDistDir: true,
trailingSlash: false,
reactStrictMode: true,
poweredByHeader: false,
experimental: {
useLightningcss: true,
},
generateBuildId: async () => APP_VERSION,
env: {
NEXT_TELEMETRY_DISABLED: "1",
APP_VERSION,
APP_VERSION_SHORT: APP_VERSION?.slice(0, 7),
},
logging: {
fetches: { fullUrl: true },
},
images: {
remotePatterns: [
{
protocol: "https",
hostname: "ipfs.io",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "imgur.com",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "i.imgur.com",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "euc.li",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "gateway.pinata.cloud",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "rainbow.mypinata.cloud",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "api.ethfollow.xyz",
port: "",
pathname: "/*",
},
{
protocol: "https",
hostname: "**",
},
],
},
/** @param {WebpackConfiguration} config */
webpack: (config, context) => {
if (config.name === "server" && config.optimization) {
config.optimization.concatenateModules = false;
}
/* WalletConnect x wagmi needed configuration */
if (config.resolve) config.resolve.fallback = { fs: false, net: false, tls: false };
if (Array.isArray(config.externals)) {
config.externals.push("lokijs", "pino-pretty", "encoding");
}
if (config.plugins) {
config.plugins.push(
new context.webpack.IgnorePlugin({
resourceRegExp: /^(lokijs|pino-pretty|encoding)$/,
}),
new context.webpack.NormalModuleReplacementPlugin(
/node:/,
(/** @type {{ request: string; }} */ resource) => {
resource.request = resource.request.replace(/^node:/, "");
}
)
);
}
],
},
/** @param {WebpackConfiguration} config */
webpack: (config, context) => {
if (config.name === "server" && config.optimization) {
config.optimization.concatenateModules = false;
}
/* WalletConnect x wagmi needed configuration */
if (config.resolve)
config.resolve.fallback = { fs: false, net: false, tls: false };
if (Array.isArray(config.externals)) {
config.externals.push("lokijs", "pino-pretty", "encoding");
}
if (config.plugins) {
config.plugins.push(
new context.webpack.IgnorePlugin({
resourceRegExp: /^(lokijs|pino-pretty|encoding)$/,
}),
new context.webpack.NormalModuleReplacementPlugin(
/node:/,
(/** @type {{ request: string; }} */ resource) => {
resource.request = resource.request.replace(/^node:/, "");
},
),
);
}

return config;
},
redirects: async () => [
{
source: "/(twitter|x)",
destination: "https://x.com/efp",
permanent: true,
},
{
source: "/github",
destination: "https://github.com/ethereumfollowprotocol",
permanent: true,
},
{
source: "/(docs|documentation)",
destination: "https://docs.ethfollow.xyz/intro",
permanent: true,
},
{
source: "/(chat|discord)",
destination: "https://discord.com/invite/ZUyG3mSXFD",
permanent: true,
},
],
/** @link https://nextjs.org/docs/app/api-reference/next-config-js/headers#options */
headers: async () => [
{
source: "/(.*)",
headers: [
{
key: "X-EFP-App-Version",
value: APP_VERSION,
},
{
key: "X-DNS-Prefetch-Control",
value: "on",
},
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Referrer-Policy",
value: "origin-when-cross-origin",
},
{
key: "Feature-Policy",
value: "geolocation 'none'; microphone 'none'; camera 'none';",
},
{
key: "Permissions-Policy",
value: "browsing-topics=()",
},
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
],
},
],
return config;
},
redirects: async () => [
{
source: "/(twitter|x)",
destination: "https://x.com/efp",
permanent: true,
},
{
source: "/github",
destination: "https://github.com/ethereumfollowprotocol",
permanent: true,
},
{
source: "/(docs|documentation)",
destination: "https://docs.ethfollow.xyz/intro",
permanent: true,
},
{
source: "/(chat|discord)",
destination: "https://discord.com/invite/ZUyG3mSXFD",
permanent: true,
},
],
/** @link https://nextjs.org/docs/app/api-reference/next-config-js/headers#options */
headers: async () => [
{
source: "/(.*)",
headers: [
{
key: "X-EFP-App-Version",
value: APP_VERSION,
},
{
key: "X-DNS-Prefetch-Control",
value: "on",
},
{
key: "X-Frame-Options",
value: "SAMEORIGIN",
},
{
key: "X-Content-Type-Options",
value: "nosniff",
},
{
key: "X-XSS-Protection",
value: "1; mode=block",
},
{
key: "Referrer-Policy",
value: "origin-when-cross-origin",
},
{
key: "Feature-Policy",
value: "geolocation 'none'; microphone 'none'; camera 'none';",
},
{
key: "Permissions-Policy",
value: "browsing-topics=()",
},
{
key: "Strict-Transport-Security",
value: "max-age=63072000; includeSubDomains; preload",
},
],
},
],
};

// https://github.com/getsentry/sentry-webpack-plugin#options
const nextConfigWithSentry = withSentryConfig(nextConfig, {
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "efp",
project: "web",
authToken: process.env.SENTRY_AUTH_TOKEN,
org: "efp",
project: "web",
// hideSourceMaps: true,
// silent: process.env['NODE_ENV'] !== 'development'
});

export default process.env.NODE_ENV === "development"
? nextConfigWithSentry
: MillionLint.next({ rsc: true })(nextConfig);
? nextConfigWithSentry
: MillionLint.next({ rsc: true })(nextConfig);
1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
"@use-gesture/react": "^10.3.1",
"caniuse-lite": "^1.0.30001687",
"clsx": "^2.1.0",
"ethereum-identity-kit": "^0.1.2",
"i18next": "^23.11.5",
"i18next-browser-languagedetector": "^8.0.0",
"i18next-http-backend": "^2.5.2",
Expand Down
3 changes: 3 additions & 0 deletions public/assets/icons/socials/discord.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions public/assets/icons/socials/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions public/assets/icons/socials/x.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 66f03f1

Please sign in to comment.