Skip to content

Commit

Permalink
Revert error message change to match tests
Browse files Browse the repository at this point in the history
  • Loading branch information
timneutkens committed Aug 28, 2024
1 parent 7440f62 commit 42286ac
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ fn report_error(app_dir: &Option<PathBuf>, filepath: &str, error_kind: RSCErrorK
let msg = if source == "Component" {
"You’re importing a class component. It only works in a Client Component but none of its parents are marked with \"use client\", so they're Server Components by default.\nLearn more: https://nextjs.org/docs/getting-started/react-essentials#client-components\n\n".to_string()
} else {
format!("You're importing a component that needs `{source}`. This React hook only works in a client component. To fix, mark the file (or its parent) with the `\"use client\"` directive.\n\n Learn more: https://nextjs.org/docs/app/building-your-application/rendering/client-components\n\n")
format!("You're importing a component that needs {source}. It only works in a Client Component but none of its parents are marked with \"use client\"\n\n")
};

(msg,span)
Expand Down

0 comments on commit 42286ac

Please sign in to comment.